<template>
	<view>
		<view class="bg">

		</view>
		<view class="" style="position: relative;">
			<!-- #ifdef MP -->
			<view class="cu-custom text-white"
				:style="{color: common.appStyle.user_font_color == 'light'?'#ffffff':'#222222'}">
				<view class="cu-bar"
					:style="{ height: $wanlshop.wanlsys().height + 'px', paddingTop: $wanlshop.wanlsys().top + 'px' }"
					style="justify-content: flex-end;padding-right: 220rpx;">
					<view class="action mp text-bold">
						<text class="wlIcon-shezhi" style="margin-right: 0.6em;"
							@tap="$wanlshop.auth('/pages/user/setting/setting')"></text>
						<text class="wlIcon-shiyongbangzhu1" @tap="help"></text>
					</view>
					<!-- 背景 -->
					<view class="bar-bg" v-if="headerOpacity > 0" :style="{ 
						height: $wanlshop.wanlsys().height + 'px', 
						opacity: headerOpacity,
					}"></view>
					<!-- 					<view class="lan">
						<text style="margin-left: 15rpx;">{{ currentLanguage }}</text>
						<u-icon name="arrow-down" style="margin-right: 5rpx;" @click="toggleDropdown" />

						<view v-if="showDropdown" class="dropdown">
							<view @click="changeLanguage(0)">中文</view>
							<view @click="changeLanguage(1)">Қазақша</view>
						</view>
					</view> -->
				</view>


			</view>
			<!-- #endif -->
			<!-- #ifndef MP -->
			<view class="cu-custom" :style="{color: common.appStyle.user_font_color == 'light'?'#ffffff':'#222222'}">
				<view class="cu-bar"
					:style="{ height: $wanlshop.wanlsys().height + 'px', paddingTop: $wanlshop.wanlsys().top + 'px' }">
					<view class="text-lg" @tap="$wanlshop.auth('/pages/user/setting/user')">
						<view v-if="headerOpacity == 1">
							<view class="cu-avatar round margin-right-xs"
								:style="{ backgroundImage: 'url(' + $wanlshop.oss(user.avatar, 35, 35, 2, 'avatar') + ')' }">
							</view>
							<text v-if="user.isLogin">{{ user.nickname }}</text>
							<text v-else>登录 / 注册</text>
						</view>
					</view>
					<!-- 背景 -->
					<view class="bar-bg" v-if="false" :style="{ 
						height: $wanlshop.wanlsys().height + 'px', 
						opacity: headerOpacity,
						backgroundColor: '#f7f7f7',
						color: common.appStyle.user_font_color == 'light'?'#ffffff':'#222222'
					}"></view>
					<view class="action">
						<!-- <block>
							<text class="wlIcon-erweima" @tap="showModal('share')"></text>
							<text class="margin-right text-sm" @tap="showModal('share')">会员码</text>
						</block> -->
						<!-- <text class="wlIcon-xiaoxizhongxin" @tap="$wanlshop.to('/pages/notice/notice')"></text> -->
						<view class=""
							style="margin-right: 44rpx;position: relative;display: flex;align-items: center;">
							<image src="https://fen.fuliaoxx.com/img/new/my/xix.png" style="width: 48rpx;height: 48rpx;"
								@tap="$wanlshop.to('/pages/notice/notice')" mode="">
							</image>
							<view class=""
								v-if="statistics.notice.notice +statistics.notice.order +statistics.notice.chat > 0"
								style="width: 10rpx;height: 10rpx;background: #FF5151;position: absolute;top: 4rpx;right: 7rpx;border-radius: 50%;">

							</view>
						</view>
						<image src="https://fen.fuliaoxx.com/img/new/my/sz.png"
							style="width: 48rpx;height: 48rpx;margin-right: 10rpx;"
							@tap="$wanlshop.auth('/pages/user/setting/setting')" mode=""></image>
						<!-- <text class="wlIcon-shezhi" @tap="$wanlshop.auth('/pages/user/setting/setting')"></text> -->

						<!-- <view class="cu-tag badge"
							v-if="statistics.notice.notice +statistics.notice.order +statistics.notice.chat > 0">
							{{ statistics.notice.notice +statistics.notice.order +statistics.notice.chat }}
						</view> -->


					</view>
				</view>
			</view>
			<!-- #endif -->
			<view class="wanl-user" :style="{ 
				color: common.appStyle.user_font_color == 'light'?'#ffffff':'#222222'}">

				<view class="user">
					<view class="avatar margin-right-bj" @tap="portrai">
						<image class="round" :src="$wanlshop.oss(user.avatar, 62, 62, 2, 'avatar')" mode="aspectFill">
						</image>
					</view>
					<view class="content" v-if="user.isLogin">
						<view class="text-xxl" style="margin-bottom: 12rpx;"
							@tap="$wanlshop.auth('/pages/user/setting/user')">{{ user.nickname }}</view>
						<view class="" style="display: flex;flex-direction: row;align-items: center;">
							<view class="usertext" @tap="$wanlshop.auth('/pages/user/collect')">
								{{$getText('收藏夹')}} {{ statistics.dynamic.collection }} <u-icon size='18rpx'
									name="arrow-right"></u-icon>
							</view>

							<view class="usertext" @tap="$wanlshop.auth('/pages/user/follow')">
								{{$getText('关注店铺')}} {{ statistics.dynamic.concern }} <u-icon size='18rpx'
									name="arrow-right"></u-icon>
							</view>

						</view>
						<!-- <view class="text-sm" @tap="$wanlshop.auth('/pages/user/signin/signin')">
							<view class="cu-tag sm radius bg-orange">
								Lv {{ user.level }}
							</view>
							<view class="cu-tag sm radius bg-orange">
								用户积分 {{ user.score }}
							</view>
						</view> -->

					</view>
					<view class="content" @tap="$wanlshop.auth('/pages/user')" v-else>
						<view class="text-xxl">登录 / 注册</view>
						<!-- <view class="cu-tag bg-orange sm radius">Hi</view> -->
						<!-- <view class="cu-tag wanl-bg-pink sm radius">Hi，欢迎登录</view> -->

					</view>
					<!-- 					<view class="" style="display: flex;align-items: center;" v-if="user.isLogin && info"
						@click="toAdmin">
						<view class="" style="margin-right: 6rpx;">
							切换商家端
						</view>
						<u-icon size='28rpx' name="arrow-right"></u-icon>
					</view> -->
				</view>
				<view class="" style="padding: 0 30rpx;">
					<view class="gwj">
						<image src="https://fen.fuliaoxx.com/img/new/my/bg.png" class="gwj__bg" mode=""></image>
						<view class="gwj__con">
							<view class="gwj__info" @tap="$wanlshop.auth('/pages/user/money/money')">
								<view class="">
									<view class="gwj__info__top">
										<image src="https://fen.fuliaoxx.com/img/new/my/j.png"
											class="gwj__info__top__icon" mode=""></image>
										{{$getText('我的钱包')}}
									</view>

									<view class="gwj__info__num">
										{{ user.money?user.money:'0.00' }}
									</view>
								</view>
								<view class="gwj__info__more">
									{{$getText('查看')}}
									<view class="" style="width: 10rpx;">

									</view>
									<u-icon size='18rpx' name="arrow-right" color="#000"></u-icon>
								</view>

							</view>
							<view class="gwj__bt" style="justify-content: space-evenly;">
								<view class="gwj__bt__item" @tap="$wanlshop.auth('/pages/user/footprint')">
									<image src="https://fen.fuliaoxx.com/img/new/my/zj.png" class="gwj__bt__item__icon"
										mode=""></image>
									{{$getText('足迹')}}
								</view>

								<!-- 				<view class="gwj__bt__item" @tap="$wanlshop.auth('/pages/user/money/money')">
									<image src="https://fen.fuliaoxx.com/img/new/my/qb.png" class="gwj__bt__item__icon"
										mode=""></image>
									{{$getText('我的钱包') }}
								</view> -->
								<!-- 	<view v-if="language==1" class="gwj__bt__item" @tap="$wanlshop.auth('/pages/user/money/money')">
									<image src="https://fen.fuliaoxx.com/img/new/my/qb.png" class="gwj__bt__item__icon"
										mode=""></image>
									قاپشىق
								</view> -->
								<view class="gwj__bt__item" @tap="$wanlshop.auth('/pages/user/coupon/list')">
									<image src="https://fen.fuliaoxx.com/img/new/my/q.png" class="gwj__bt__item__icon"
										mode=""></image>

									{{$getText('红包卡券')}}
								</view>

							</view>
						</view>
					</view>
					<view class="wanl-user-order">
						<view class="title">
							{{$getText('我的订单')}}

							<view class="more" @tap="$wanlshop.auth('/pages/user/order/order')">
								{{$getText('全部订单')}}
								<u-icon size='18rpx' name="arrow-right" color="#9A9A9A"></u-icon>
							</view>
						</view>


						<view class="project text-sm wanl-gray-dark">
							<view @tap="$wanlshop.auth('/pages/user/order/order?state=1')">
								<text class="wlIcon-31daifukuan wanl-pip"></text>
								{{$getText('待支付')}}
								<view class="cu-tag badge bg-orange" v-if="statistics.order.pay > 0">
									{{ $wanlshop.toFormat(statistics.order.pay, 'hundred') }}
								</view>
							</view>

							<view @tap="$wanlshop.auth('/pages/user/order/order?state=2')">
								<text class="wlIcon-31daifahuo wanl-pip"></text>
								{{$getText('待发货')}}
								<view class="cu-tag badge bg-orange" v-if="statistics.order.delive > 0">
									{{ $wanlshop.toFormat(statistics.order.delive, 'hundred') }}
								</view>
							</view>

							<view @tap="$wanlshop.auth('/pages/user/order/order?state=3')">
								<text class="wlIcon-31daishouhuo wanl-pip"></text>
								{{$getText('待收货')}}
								<view class="cu-tag badge bg-orange" v-if="statistics.order.receiving > 0">
									{{ $wanlshop.toFormat(statistics.order.receiving, 'hundred') }}
								</view>
							</view>

							<view @tap="$wanlshop.auth('/pages/user/order/order?state=4')">
								<text class="wlIcon-31daipingjia wanl-pip"></text>
								{{$getText('待评价')}}
								<view class="cu-tag badge bg-orange" v-if="statistics.order.evaluate > 0">
									{{ $wanlshop.toFormat(statistics.order.evaluate, 'hundred') }}
								</view>
							</view>

							<view class="solid-left" @tap="$wanlshop.auth('/pages/user/refund/lists')"
								style="display: flex;flex-direction: column;align-items: center;">
								<image src="https://fen.fuliaoxx.com/img/new/my/sh.png"
									style="width: 48rpx;height: 48rpx;margin-bottom: 7rpx;" mode=""></image>
								{{$getText('退货/售后')}}
								<view class="cu-tag badge bg-orange" v-if="statistics.order.customer > 0">
									{{ $wanlshop.toFormat(statistics.order.customer, 'hundred') }}
								</view>
							</view>

						</view>
						<!-- <view class="logistics margin-top-bj padding-sm" v-if="statistics.logistics.length > 0">
							<swiper vertical autoplay circular disable-touch interval="4000" class="swiper">
								<swiper-item @tap="$wanlshop.auth('/pages/notice/logistics/details')">
									<view class="title">
										<view class="text-sm">最新物流</view>
										<view class="text-sm">18:00</view>
									</view>
									<view class="flex align-center">
										<view class="cu-avatar" :style="{ backgroundImage: 'url(' + $wanlshop.oss(user.avatar, 40, 40) + ')' }"></view>
										<view class="content">
											<view class="text-df">
												<text class="wlIcon-paisongtixing"></text>
												派送中
											</view>
											<view class="text-sm">【自提柜】已签收，签收人凭取件码 已取件。</view>
										</view>
									</view>
								</swiper-item>
							</swiper>
						</view> -->
					</view>
					<view class="xx">
						<view class="xx__item" v-for="(item,index) in xxlist" :key="index" @click="click(item)">
							<image :src="'https://fen.fuliaoxx.com/img/new/my/t'+index+'.png'" class="xx__item__icon"
								mode="" v-if="item.name !='智能小艾' && item.name !='切换商家端'"></image>
							<image src="https://fen.fuliaoxx.com/img/new/my/t33.png" class="xx__item__icon" mode=""
								v-if="item.name =='智能小艾'"></image>
							<image src="https://fen.fuliaoxx.com/img/new/my/t66.png" class="xx__item__icon" mode=""
								v-if="item.name =='切换商家端'"></image>
							<view class="xx__item__r">
								<view class="xx__item__label">
									{{ $getText(item.name) }}
								</view>
								<u-icon size='26rpx' name="arrow-right" color="#9A9A9A"></u-icon>
							</view>

						</view>

					</view>
				</view>



				<!-- <view class="operate">
					<view class="text-sm" @tap="$wanlshop.auth('/pages/user/collect')">
						<text class="text-bold">{{ statistics.dynamic.collection }}</text>
						收藏夹
					</view>
					<view class="text-sm" @tap="$wanlshop.auth('/pages/user/follow')">
						<text class="text-bold">{{ statistics.dynamic.concern }}</text>
						关注店铺
					</view>
					<view class="text-sm" @tap="$wanlshop.auth('/pages/user/footprint')">
						<text class="text-bold">{{ statistics.dynamic.footprint }}</text>
						足迹
					</view>
					<view class="text-sm" @tap="$wanlshop.auth('/pages/user/order/order')">
						<text class="text-bold">{{ $wanlshop.toFormat(statistics.order.whole, 'hundred') }}</text>
						全部订单
					</view>
			
				</view> -->
				<!-- <view class="activity padding-bj">
					<view class="bg-white radius grid text-center col-2 padding-lr-bj padding-tb-sm">
						<view class="solid-right flex justify-between" @tap="$wanlshop.auth('/pages/user/coupon/list')">
							<view class="content">
								<view class="wanl-black text-sm text-bold6">红包卡券</view>
								<view class="text-min text-orange">
									领取优惠券
									<text class="wlIcon-fanhui2 margin-left-xs"></text>
								</view>
							</view>
							<view class="cu-avatar"
								:style="{ backgroundImage: 'url(' + $wanlshop.appstc('/user/icon_card_bag.png') + ')' }">
							</view>
						</view>
						<view class="flex justify-between" @tap="$wanlshop.auth('/pages/user/signin/log')">
							<view class="content margin-left-bj">
								<view class="wanl-black text-sm text-bold6">我的积分</view>
								<view class="text-min text-orange">
									查看积分明细
									<text class="wlIcon-fanhui2 margin-left-xs"></text>
								</view>
							</view>
							<view class="cu-avatar"
								:style="{ backgroundImage: 'url(' + $wanlshop.appstc('/user/icon_super_vip.png') + ')' }">
							</view>
						</view>
					</view>
				</view> -->
			</view>



			<!-- <view class="wanl-user-order padding-sm margin-bj" style="margin-top: 25rpx;">
				<view class="project text-sm wanl-gray-dark">
					<view style="line-height: 1.8;" @tap="$wanlshop.auth('/pages/user/coupon/mycard')">
						<view class="wanl-pip text-lg text-bold6">{{ statistics.dynamic.coupon }}</view>
						我的卡券
					</view>
					<view style="line-height: 1.8;" @tap="$wanlshop.auth('/pages/user/money/money')">
						<view class="wanl-pip text-lg text-bold6">{{ user.money?user.money:'0.00' }}</view>
						余额
					</view>
					<view style="line-height: 1.8;" @tap="$wanlshop.auth('/pages/user/bank/bank')">
						<view class="wanl-pip text-lg text-bold6">{{ statistics.dynamic.accountbank }}</view>
						银行卡
					</view>
					<view style="line-height: 1.8;" @tap="$wanlshop.auth('/pages/user/signin/log')">
						<view class="wanl-pip text-lg text-bold6">{{ user.score?user.score:0 }}</view>
						积分
					</view>
					<view class="solid-left" @tap="$wanlshop.auth('/pages/user/money/list')">
						<text class="wlIcon-hongbao wanl-orange"></text>
						账单明细
					</view>
				</view>
			</view> -->

			<!-- <view class="wanl-user-tool padding-top-bj margin-lr-bj">
				<view class="list text-sm grid col-5 wanl-gray-dark">
					<view @tap="$wanlshop.auth('/pages/user/money/money')">
						<text class="wlIcon-youhuiquantuangou wanl-orange"></text>
						钱包
					</view>
					<view @tap="$wanlshop.auth('/pages/apps/groups/order/order')">
						<text class="wlIcon-pintuan2 wanl-text-yellow"></text>
						拼团订单
						<view class="cu-tag badge bg-orange" v-if="statistics.order.groups > 0">
							{{ $wanlshop.toFormat(statistics.order.groups, 'hundred') }}
						</view>
					</view>
					<view @tap="$wanlshop.auth('/pages/user/comment/comment')">
						<text class="wlIcon-icon_pinglun wanl-text-red"></text>
						评论
					</view>
					<view @tap="$wanlshop.auth('/pages/user/distribution/distribution')">
						<text class="wlIcon-fenxiao wanl-text-yellow"></text>
						分销
					</view>
					<view @tap="$wanlshop.auth('/pages/user/order/bargain')">
						<text class="wlIcon-jiage wanl-text-light-blue"></text>
						我的砍价
					</view>
					<view @tap="$wanlshop.auth('/pages/user/address/address')">
						<text class="wlIcon-dizhi wanl-text-yellow"></text>
						收货地址
					</view>
					<view @tap="$wanlshop.auth('/pages/user/signin/signin')">
						<text class="wlIcon-mianxing-rili wanl-orange"></text>
						签到
					</view>
					<view @tap="$wanlshop.auth('/pages/user/complaint/lists')">
						<text class="wlIcon-31guanzhuxuanzhong wanl-text-light-blue"></text>
						我的举报
					</view>
					<view @tap="$wanlshop.auth('/pages/user/feedback/lists')">
						<text class="wlIcon-pingjiazongjie wanl-text-blue"></text>
						反馈
					</view>
					<view @tap="help">
						<text class="wlIcon-bangzhu3 wanl-text-green"></text>
						帮助中心
					</view>
					<view @tap="$wanlshop.auth('/pages/user/service')">
						<text class="wlIcon-icon-service wanl-text-purple"></text>
						智能小蜜
					</view>
					<view @tap="$wanlshop.auth('/pages/shop/live/live')">
						<text class="wlIcon-icon_zhibo-mian wanl-text-blue"></text>
						商家直播
					</view>
					<view @tap="$wanlshop.auth('/pages/apps/find/user')">
						<text class="wlIcon-pengyouquan wanl-text-red"></text>
						创作中心
					</view>
					<view @tap="setting">
						<text class="wlIcon-shezhi1 wanl-text-green"></text>
						设置
					</view>
				</view>
			</view> -->
			<view class="xh">
				<view class="xh__d">

				</view>
				{{$getText('猜你喜欢')}}

				<view class="xh__d">

				</view>
			</view>

			<!-- <image src="https://fen.fuliaoxx.com/img/new/my/xh.png" style="height: 97rpx;width: 750rpx;" mode=""></image> -->
			<!-- <wanl-product :dataList="likeData" /> -->
			<view class="" style="padding: 0 24rpx;position: relative;">
				<goodslist :leftList='leftList' :rightList="rightList"></goodslist>
			</view>
			<uni-load-more :status="status" :content-text="contentText" />
			<!-- 分享 -->
			<view class="cu-modal wanl-share " :class="modalName == 'share' ? 'show' : ''" @tap="hideModal()">
				<view v-if="modalName == 'share'" class="cu-dialog" @tap.stop="">
					<wanl-poster ref="wanlPoster" page="pages/user" :scene="{qr:'u'}" @success="posterSuccess"
						@change="hideModal" />
				</view>
			</view>
			<view class="edgeInsetBottom"></view>
			<home></home>
		</view>

	</view>
</template>

<script>
	import {
		mapState,
		mapActions,
	} from 'vuex';
	import home from '@/components/home/index'
	export default {
		components: {
			home
		},
		data() {
			return {
				showDropdown: false, // 控制下拉框的显示与隐藏
				leftList: [],
				rightList: [],
				modalName: '',
				headerOpacity: 0,
				// 上拉刷新
				reload: true,
				likeData: [],
				current_page: 1, //当前页码
				last_page: 1, //总页码
				status: 'loading',
				contentText: {
					contentdown: ' ',
					contentrefresh: '正在加载...',
					contentnomore: '没有更多数据了'
				},
				info: null,
				xxlist: [{
						name: '拼团订单',
						url: '/pages/apps/groups/order/order'
					},
					{
						name: '收货地址',
						url: '/pages/user/address/address'
					},
					{
						name: '我要反馈',
						url: '/pages/user/feedback/feedback'
					},
					{
						name: '智能小艾',
						url: '/pages/user/service'
					},
					{
						name: '创作中心',
						url: '/pages/apps/find/user'
					},
					{
						name: '我的举报',
						url: '/pages/user/complaint/lists'
					},
					{
						name: '切换商家端',
						url: '/pagesA/login/login'
					},
					{
						name: '帮助中心',
						type: 'help'
					},
				],
				xxlist2: [{
						name: 'توپتىق تاپسىرستار',
						url: '/pages/apps/groups/order/order'
					},
					{
						name: ' جەتكىزۋ مەكەن جايى',
						url: '/pages/user/address/address'
					},
					{
						name: 'ۇسنىس',
						url: '/pages/user/feedback/feedback'
					},
					{
						name: 'بايلانىس',
						url: '/pages/user/service'
					},
					{
						name: 'جاسامپازدىق ورتالعى',
						url: '/pages/apps/find/user'
					},
					{
						name: 'مەنىڭ شاعىمدارىم',
						url: '/pages/user/complaint/lists'
					},
					{
						name: '切换商家端',
						url: '/pagesA/login/login'
					},
					{
						name: 'كومەك ورتالعى',
						type: 'help'
					},
				]
			};
		},
		computed: {
			...mapState(['user', 'statistics', 'common']),
			...mapState('translate', ['language']),
			currentLanguage() {
				return this.language === 0 ? '中文' : 'Қазақша';
			},
			// txt() {
			//     return this.langMap[this.language] || this.langMap[0]; // 兜底中文
			//   },
		},
		onPullDownRefresh() {
			this.loadData();
		},
		async onShow() {
			setTimeout(() => {
				uni.setNavigationBarColor({
					frontColor: this.$store.state.common.appStyle.user_font_color == 'light' ?
						'#ffffff' : '#000000',
					backgroundColor: this.$store.state.common.appStyle.user_nav_color
				})
			}, 200);
			if (this.$store.state.user.isLogin) {
				this.loadData();
				// await uni.request({
				// 	url: '/index/shopInfo',
				// 	method: "GET",
				// 	success: res => {
				// 		this.info = res.data.shopInfo;
				// 	}
				// });
			}
		},
		onLoad(query) {
			if (query.hasOwnProperty('scene')) {
				let scene = decodeURIComponent(query.scene);
				scene = this.$wanlshop.getParam(scene);
				console.log('小程序码进入：', scene);
			}
			if (this.$store.state.user.isLogin) {
				this.loadData();
			} else {

			}
			this.loadlikeData();
		},
		onPageScroll(e) {
			let tmpY = 50;
			e.scrollTop = e.scrollTop > tmpY ? 50 : e.scrollTop; //如果当前高度大于250则250否则当前高度
			this.headerOpacity = e.scrollTop * (1 / tmpY); //$headerOpacity 赋值当前高度x（1÷250）
		},
		onReachBottom() {
			//判断是否最后一页
			if (this.current_page >= this.last_page) {
				this.status = 'noMore';
			} else {
				this.reload = false;
				this.current_page = this.current_page + 1; //页码+1
				this.status = 'loading';
				this.loadlikeData();
			}
		},
		methods: {

			...mapActions({
				switchLanguage: 'translate/switchLanguage', // 映射 Vuex 中的 action
			}),
			toggleDropdown() {
				this.showDropdown = !this.showDropdown; // 切换下拉菜单显示
			},
			changeLanguage(index) {
				console.log('点击语言：', index);
				this.switchLanguage(index);
				console.log('切换后 language：', this.$store.state.translate.language); // ✅ 打印 Vuex 状态
				this.showDropdown = false;
			},
			toAdmin() {
				uni.reLaunch({
					url: "/pagesA/index/index"
				})
			},
			async click(item) {
				if (item.url == "/pagesA/login/login") {
					if (this.$store.state.user.isLogin) {
						await uni.request({
							url: '/user/logout',
							method: "POST",
							success: res => {}
						});
					}
					uni.removeStorageSync("wanlshop:statis");
					uni.removeStorageSync("wanlshop:user");
					this.$store.dispatch('user/logout');
					this.$store.dispatch('statistics/logout');
					uni.reLaunch({
						url: "/pagesA/index/index"
					})
					return
				}
				if (item.url) {
					this.$wanlshop.auth(item.url)
					return
				}
				this[item.type]()
			},
			async loadData() {
				await uni.request({
					url: '/wanlshop/user/refresh',
					method: 'POST',
					success: res => {
						this.$store.commit('statistics/edit', res.data.statistics);
						this.$store.commit('user/setUserInfo', res.data.userinfo);
					}
				});
				uni.stopPullDownRefresh();
			},
			// 滚动底部加载猜你喜欢
			async loadlikeData() {
				await uni.request({
					url: '/wanlshop/product/likes?pages=user',
					data: {
						page: this.current_page
					},
					success: res => {
						this.likeData = this.reload ? res.data.data : this.likeData.concat(res.data
							.data); //评论数据 追加
						this.current_page = res.data.current_page; //当前页码
						this.last_page = res.data.last_page; //总页码
						this.status = res.data.total == 0 ? 'noMore' : 'more';
						this.leftList = []
						this.rightList = []
						this.likeData.map((t, i) => {
							if (i % 2 == 0) {
								this.leftList.push(t)
							}
							if (i % 2 == 1) {
								this.rightList.push(t)
							}
						})
					}
				});
			},
			// 弹出层
			showModal(name) {
				if (name == 'share') {
					if (this.user.isLogin) {
						this.modalName = name;
					} else {
						this.$wanlshop.to('/pages/user/auth/auth');
					}
				} else {
					this.modalName = name;
				}
			},
			hideModal() {
				this.modalName = null;
			},
			posterSuccess(e) {},
			// 帮助
			help() {
				this.$wanlshop.to('/pages/user/help');
			},
			// 设置
			setting() {
				this.$wanlshop.to('/pages/user/setting/setting');
			},
			portrai() {
				this.$wanlshop.to('/pages/user/portrait/portrait');
			}
		}
	};
</script>

<style>
	.bg {
		background: linear-gradient(180deg, #FFFFFF 0%, #F2F2F2 100%);
		width: 750rpx;
		height: 1302rpx;
		position: fixed;
		top: 0;
		left: 0;
	}

	.cu-bar .action.mp:first-child>text[class*='wlIcon-'] {
		margin-left: 0;
	}

	.wanl-user {
		background-repeat: no-repeat;
		background-size: 100%;
		position: relative;
	}

	.wanl-user .user {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 30rpx;
		padding-bottom: 30rpx;
	}

	.wanl-user .user .avatar {
		position: relative;
		height: 123rpx;
		width: 123rpx;
		border-radius: 5000rpx;
		overflow: hidden;
		border: 3px solid rgba(255, 255, 255, .25);
	}

	.wanl-user .user .avatar image {
		height: 120rpx;
	}

	.wanl-user .user .avatar .tag {
		position: absolute;
		bottom: 0;
		right: 0;
	}

	.wanl-user .user .content {
		flex: 1;
	}

	/* 操作 */
	.wanl-user .operate {
		display: flex;
		justify-content: space-around;
		text-align: center;
		padding-bottom: 70rpx;
		line-height: 1.3;
	}

	.wanl-user .operate text {
		display: block;
		font-size: 32rpx;
	}

	/* 活动 */
	.wanl-user .activity {
		position: absolute;
		width: 100%;
		bottom: -80rpx;
	}

	.wanl-user .activity .radius {
		border-radius: 24rpx;
	}

	.wanl-user .activity .cu-avatar {
		width: 69rpx;
		height: 69rpx;
		margin-right: 30rpx;
		background-color: transparent;
		/* border: 1px solid rgba(255,255,255,.6); */
	}

	.wanl-user .activity .content {
		text-align: left;
		height: 68rpx;
	}

	/* 订单 */
	.wanl-user-order {
		border-radius: 12rpx;
		background-color: white;
		padding-bottom: 28rpx;
	}

	.wanl-user-order .title {
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #333333;
		padding: 28rpx 28rpx 36rpx;

	}

	.wanl-user-order .title .more {
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 24rpx;
		color: #9A9A9A;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}



	/* 状态 */
	.wanl-user-order .project {
		display: flex;
		justify-content: space-around;
		text-align: center;
	}

	.wanl-user-order .project>view {
		position: relative;
		flex: 1;
	}

	.wanl-user-order .project>view .cu-tag {
		top: -4rpx;
		right: 26rpx;
	}

	.wanl-user-order .project text {
		display: block;
		font-size: 50rpx;
		margin-bottom: 6rpx;
	}

	/* 物流 */
	.wanl-user-order .logistics {
		background-color: #f9f9f9;
		border-radius: 24rpx;
	}

	.wanl-user-order .logistics .swiper {
		height: 120rpx;
	}

	.wanl-user-order .logistics .swiper .title {
		display: flex;
		justify-content: space-between;
		margin-bottom: 10rpx;
		color: #999999;
	}

	.wanl-user-order .logistics .swiper .cu-avatar {
		margin-right: 10rpx;
		height: 66rpx;
		width: 66rpx;
		border-radius: 12rpx;
		background-color: #ffffff;
	}

	.wanl-user-order .logistics .swiper .content .text-df {
		color: #3797e0;
		font-size: 27rpx;
		margin-bottom: 2rpx;
	}

	.wanl-user-order .logistics .swiper .content .text-sm {
		color: #999999;
	}

	.wanl-user-order .logistics .swiper .content text {
		font-size: 32rpx;
		margin-left: 15rpx;
		margin-right: 10rpx;
	}

	/* 工具箱 */
	.wanl-user-tool {
		background-color: #ffffff;
		border-radius: 24rpx;
	}

	.wanl-user-tool .title {
		display: flex;
		justify-content: space-between;
		align-items: flex-end;
	}

	.wanl-user-tool .title text {
		margin-left: 2rpx;
	}

	/* 状态 */
	.wanl-user-tool .list {
		text-align: center;
	}

	.wanl-user-tool .list>view {
		margin-bottom: 28rpx;
		position: relative;
	}

	.wanl-user-tool .list>view .cu-tag {
		top: -8rpx;
		left: 80rpx;
		right: unset;
	}

	.wanl-user-tool .list text {
		display: block;
		font-size: 54rpx;
		margin-bottom: 8rpx;
	}

	.usertext {
		display: flex;
		flex-direction: row;
		align-items: center;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 24rpx;
		color: #333333;
		margin-right: 20rpx;
	}

	.lan {
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: relative;
		/* 确保下拉框显示在容器的下方 */
	}

	.u-icon {
		cursor: pointer;
	}

	.dropdown {
		position: absolute;
		top: 100%;
		/* 下拉框出现在容器下方 */
		left: 0;
		background-color: #fff;
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
		width: 100px;
		/* 设置下拉框宽度 */
		border-radius: 5px;
		z-index: 10;
	}

	.dropdown view {
		padding: 10px;
		cursor: pointer;
	}

	.dropdown view:hover {
		background-color: #f0f0f0;
	}
</style>
<style lang="scss">
	.gwj {
		height: 266rpx;
		width: 690rpx;
		position: relative;
		margin-bottom: 24rpx;

		&__bg {
			height: 266rpx;
			width: 690rpx;
			position: absolute;
			top: 0;
			left: 0;
		}

		&__con {
			height: 266rpx;
			width: 690rpx;
			position: absolute;
			top: 0;
			left: 0;
		}

		&__info {
			height: 176rpx;
			display: flex;
			align-items: center;
			padding: 0 28rpx;
			justify-content: space-between;

			&__top {
				display: flex;
				flex-direction: row;
				align-items: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 30rpx;
				color: #222222;
				line-height: 42rpx;

				&__icon {
					width: 36rpx;
					height: 36rpx;
					margin-right: 8rpx;
				}
			}

			&__num {
				font-family: DIN, DIN;
				font-weight: bold;
				font-size: 52rpx;
				color: #000000;
				line-height: 64rpx;
				margin-top: 16rpx;
			}

			&__more {
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #000000;
				display: flex;
				flex-direction: row;
				align-items: center;
			}
		}

		&__bt {
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-between;
			height: 90rpx;
			background: #FFFFFF;
			border-radius: 0rpx 0rpx 12rpx 12rpx;

			&__item {
				width: 33.33%;
				display: flex;
				align-items: center;
				justify-content: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #333333;

				&__icon {
					width: 34rpx;
					height: 34rpx;
					margin-right: 8rpx;
				}
			}
		}
	}

	.xx {
		margin-top: 24rpx;
		background: #FFFFFF;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		padding: 0 28rpx;

		&__item {
			height: 106rpx;
			display: flex;
			flex-direction: row;
			align-items: center;

			&__icon {
				width: 42rpx;
				height: 42rpx;
				margin-right: 20rpx;
			}

			&__r {
				height: 106rpx;
				flex: 1;
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: space-between;
				border-bottom: 2rpx solid #F7F7FA;
			}

			&__label {
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 30rpx;
				color: #333333;
			}
		}
	}

	.xh {
		font-family: HelloFont WenYiHei, HelloFont WenYiHei;
		font-weight: bold;
		font-size: 32rpx;
		color: #000000;
		padding: 32rpx 0 20rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		position: relative;

		&__d {
			width: 10rpx;
			height: 10rpx;
			background: #484848;
			margin: 0 13rpx;
			border-radius: 50%;
		}
	}
</style>